package UIFree.controls
{
	import UIFree.uif_component;
	
	import flash.events.MouseEvent;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;

	public class uif_anchor extends uif_label {
		public var link: String;
		public function uif_anchor(parent:uif_component, ax:int=0, ay:int=0, 
									awidth:int=0, aheight:int=0, styleClass:String='', a_url: String='') {
			super(parent, ax, ay, awidth, aheight, styleClass);
			link = a_url;
			addEventListener(MouseEvent.CLICK, doRelease);
		}
		
		public function doRelease(e: MouseEvent): void {
			if (link) navigateToURL(new URLRequest(link));
		}
	}
}